<template>
 <view class="helps">
   <com-banner :styleClass="{
     width:'100%',
     height:'300rpx'
   }"  src="/static/helpax/65f52464302f3da79fc4ac828dbb8e1.png"  @routers="onRouters"/>
   <view class="link">
     <view class="a" v-for="(item,index) in iconList" :key="index">
       <image :src="item.img"
                            @click="onSrc(item)"
     ></image>
     <view>{{item.title}}</view>
     </view>
   </view>
 </view>
</template>

<script>
import comBanner from '../banner'
import wantToDedicateCompoentns from '../wantToDedicate/wantToDedicate'
import { iconHelpList } from '@/common/type'
export default {
  components: {
    wantToDedicateCompoentns,
    comBanner,
  },
  data(){
    return {
      iconList:iconHelpList(),//我的帮助列表
    }
  },
  mounted() {
  },
  methods:{
    //第index张图片和type类型
    onSrc({index,type}) {
      this.$api.handleMenu(`/pages/myHelp/myHelp?type=${type}`)
    },
    onRouters(){
      this.$api.handleMenu('/pages/me-call/me-call')
    }
  }
}
</script>

<style lang="scss" scope>
.helps{
  padding-top: 20rpx;
}
.link{
  display: flex;
  flex-wrap: wrap;
  justify-content:space-around;
  .a{
    box-sizing: border-box;
    text-align: center;
    padding-top: 47rpx;
    image {
      width: 90rpx;
      height: 90rpx;
    }
    view {
      white-space: nowrap;
      font-size: 24rpx;
      font-family: PingFang;
      font-weight: 500;
      color: #222222;
      padding-top: 19rpx;
    }
  }

}
</style>
